package com.xyzboom.compiler.compiler.grammar

import com.fasterxml.jackson.core.type.TypeReference
import com.fasterxml.jackson.module.kotlin.jsonMapper
import com.xyzboom.compiler.compiler.ast.assertASTNodeType
import com.xyzboom.compiler.compiler.ast.getGrammarProductions
import com.xyzboom.compiler.compiler.lexer.LexerRule
import com.xyzboom.compiler.compiler.lexer.parseCode
import com.xyzboom.compiler.compiler.lr.GRAMMAR_NAME
import com.xyzboom.compiler.compiler.lr.PredictTable


/**
 * Type 2 Grammar
 *
 * @property start Starting symbol
 * @property productions Productions
 * @constructor Create empty Grammar2
 */
open class Grammar2(
    val start: NonTerminator,
    val productions: ArrayList<Production>,
) {
    companion object {
        private val grammarLexerRules =
            jsonMapper().readerFor(object : TypeReference<List<LexerRule>>() {})
                .readValue<List<LexerRule>>(
                    "[{\"name\":\"space\",\"typeName\":\"SPACE\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\" \\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\r\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\u000B\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\f\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\t\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\n\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1},\"1\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\" \\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\r\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\u000B\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\f\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\t\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\n\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"string\",\"typeName\":\"STRING\",\"dfa\":{\"i\":0,\"e\":[5],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":4},\"1\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":5,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\\\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":2,\"{\\\"type\\\":\\\"2\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1},\"2\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":3},\"3\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":5,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\\\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":2,\"{\\\"type\\\":\\\"2\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1},\"4\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":5,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"\\\\\\\\\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":2,\"{\\\"type\\\":\\\"2\\\",\\\"value\\\":\\\"\\\\\\\"\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"letters\",\"typeName\":\"NONE\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"R\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"o\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"N\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"k\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"J\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"g\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"F\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"c\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"B\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"W\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"x\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"S\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"t\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"O\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"p\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"K\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"l\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"G\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"h\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"C\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"d\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"X\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"u\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"T\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"P\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"m\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"L\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"i\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"H\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"e\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"D\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"a\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"U\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"v\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"r\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"M\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"n\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"I\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"j\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"E\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"f\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"A\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"b\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"w\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"V\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"s\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1},\"1\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"R\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"o\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"N\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"k\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"J\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"g\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"F\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"c\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"B\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"W\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"x\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"S\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"t\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"O\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"p\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"K\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"l\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"G\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"h\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"C\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"d\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"X\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"u\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"T\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"P\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"m\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"L\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"i\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"H\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"e\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"D\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"a\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"U\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"v\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"r\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"M\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"n\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"I\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"j\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"E\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"f\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"A\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"b\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"w\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"V\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"s\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"numbers\",\"typeName\":\"NONE\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"1\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"2\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"0\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"9\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"7\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"8\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"5\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"6\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"3\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"4\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1},\"1\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"1\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"2\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"0\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"9\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"7\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"8\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"5\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"6\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"3\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"4\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"id\",\"typeName\":\"ID\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"R\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"o\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"N\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"k\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"J\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"g\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"F\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"c\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"B\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"_\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"W\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"x\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"S\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"t\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"O\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"p\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"K\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"l\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"G\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"h\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"C\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"d\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"X\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"u\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"T\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"P\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"m\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"L\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"i\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"H\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"e\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"D\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"a\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"U\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"v\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"r\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"M\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"n\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"I\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"j\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"E\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"f\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"A\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"b\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"w\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"V\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"s\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1},\"1\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"1\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"R\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"o\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"N\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"k\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"J\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"g\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"F\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"c\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"B\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"_\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"W\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"x\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"6\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"S\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"t\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"2\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"O\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"p\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"K\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"l\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"G\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"h\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"C\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"d\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"7\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"X\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"u\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"3\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"T\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"P\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"m\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"L\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"i\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"H\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"e\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"D\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"a\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Y\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"8\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"U\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"v\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"4\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Q\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"r\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"0\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"M\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"n\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"I\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"j\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"E\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"f\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"A\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"b\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"9\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"Z\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"w\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"5\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"V\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1,\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"s\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"colon\",\"typeName\":\"SPLIT\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\":\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"semicolon\",\"typeName\":\"SPLIT\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\";\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true},{\"name\":\"or\",\"typeName\":\"SPLIT\",\"dfa\":{\"i\":0,\"e\":[1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"0\\\",\\\"value\\\":\\\"|\\\",\\\"@K-Class\\\":\\\"java.lang.Character\\\"}\":1}}},\"greedy\":true}]"
                )
        private val grammarSkipTokens = hashSetOf(
            "space",
        )
        internal val predictTable =
            jsonMapper().readerFor(PredictTable::class.java)
                .readValue<PredictTable>(
                    "{\"@class\":\"com.xyzboom.compiler.compiler.lr.PredictTable\",\"productions\":[{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Grammar\"},\"right\":[{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod\"}]},{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Grammar\"},\"right\":[{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Grammar\"}]},{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod\"},\"right\":[{\"type\":\"com.xyzboom.compiler.compiler.grammar.Terminator\",\"tokenName\":\"id\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.Terminator\",\"tokenName\":\"colon\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod_right\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.Terminator\",\"tokenName\":\"semicolon\"}]},{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod_right\"},\"right\":[{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Ids\"}]},{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod_right\"},\"right\":[{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Ids\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.Terminator\",\"tokenName\":\"or\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Prod_right\"}]},{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Ids\"},\"right\":[]},{\"left\":{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Ids\"},\"right\":[{\"type\":\"com.xyzboom.compiler.compiler.grammar.Terminator\",\"tokenName\":\"id\"},{\"type\":\"com.xyzboom.compiler.compiler.grammar.NonTerminator\",\"name\":\"Ids\"}]}],\"dfa\":{\"i\":0,\"e\":[-1],\"m\":{\"0\":{\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Grammar\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":1,\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":3,\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":2},\"1\":{\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":-1},\"2\":{\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Grammar\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":4,\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":3,\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":2,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":0},\"3\":{\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"colon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5},\"4\":{\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":1},\"5\":{\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Ids\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":7,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5,\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":8,\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod_right\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":6,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5},\"6\":{\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":9},\"7\":{\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":3,\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":10},\"8\":{\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Ids\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":11,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5,\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":8,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5},\"9\":{\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":2,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":2},\"10\":{\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Ids\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":7,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5,\"{\\\"type\\\":\\\"3\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":8,\"{\\\"type\\\":\\\"5\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod_right\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.NonTerminator\\\"}\":12,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":5},\"11\":{\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":6,\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":6},\"12\":{\"{\\\"type\\\":\\\"4\\\",\\\"value\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"@K-Class\\\":\\\"com.xyzboom.compiler.compiler.grammar.Terminator\\\"}\":4}}}}\n"
                )
//internal val predictTable =
//            jsonMapper().readerFor(PredictTable::class.java)
//                .readValue<PredictTable>(
//                    "{\"productions\":[{\"left\":{\"name\":\"Grammar\"},\"right\":[{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Prod\"}]},{\"left\":{\"name\":\"Grammar\"},\"right\":[{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Prod\"},{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Grammar\"}]},{\"left\":{\"name\":\"Prod\"},\"right\":[{\"type\":\"com.xyzboom.compiler.grammar.Terminator\",\"tokenName\":\"id\"},{\"type\":\"com.xyzboom.compiler.grammar.Terminator\",\"tokenName\":\"colon\"},{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Prod_right\"},{\"type\":\"com.xyzboom.compiler.grammar.Terminator\",\"tokenName\":\"semicolon\"}]},{\"left\":{\"name\":\"Prod_right\"},\"right\":[{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Ids\"}]},{\"left\":{\"name\":\"Prod_right\"},\"right\":[{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Ids\"},{\"type\":\"com.xyzboom.compiler.grammar.Terminator\",\"tokenName\":\"or\"},{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Prod_right\"}]},{\"left\":{\"name\":\"Ids\"},\"right\":[]},{\"left\":{\"name\":\"Ids\"},\"right\":[{\"type\":\"com.xyzboom.compiler.grammar.Terminator\",\"tokenName\":\"id\"},{\"type\":\"com.xyzboom.compiler.grammar.NonTerminator\",\"name\":\"Ids\"}]}],\"dfa\":{\"i\":0,\"e\":[-1],\"m\":{\"0\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Grammar\\\"},\\\"t\\\":\\\"5\\\"}\":1,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"t\\\":\\\"3\\\"}\":3,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod\\\"},\\\"t\\\":\\\"5\\\"}\":2},\"1\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"t\\\":\\\"4\\\"}\":-1},\"2\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Grammar\\\"},\\\"t\\\":\\\"5\\\"}\":4,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"t\\\":\\\"3\\\"}\":3,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod\\\"},\\\"t\\\":\\\"5\\\"}\":2,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"t\\\":\\\"4\\\"}\":0},\"3\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"colon\\\"},\\\"t\\\":\\\"3\\\"}\":5},\"4\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"t\\\":\\\"4\\\"}\":1},\"5\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"t\\\":\\\"4\\\"}\":5,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Ids\\\"},\\\"t\\\":\\\"5\\\"}\":7,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"t\\\":\\\"3\\\"}\":8,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"4\\\"}\":5,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod_right\\\"},\\\"t\\\":\\\"5\\\"}\":6},\"6\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"3\\\"}\":9},\"7\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"4\\\"}\":3,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"t\\\":\\\"3\\\"}\":10},\"8\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"t\\\":\\\"4\\\"}\":5,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Ids\\\"},\\\"t\\\":\\\"5\\\"}\":11,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"t\\\":\\\"3\\\"}\":8,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"4\\\"}\":5},\"9\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"t\\\":\\\"4\\\"}\":2,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"#\\\"},\\\"t\\\":\\\"4\\\"}\":2},\"10\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"t\\\":\\\"4\\\"}\":5,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Ids\\\"},\\\"t\\\":\\\"5\\\"}\":7,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"id\\\"},\\\"t\\\":\\\"3\\\"}\":8,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"4\\\"}\":5,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.NonTerminator\\\",\\\"name\\\":\\\"Prod_right\\\"},\\\"t\\\":\\\"5\\\"}\":12},\"11\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"or\\\"},\\\"t\\\":\\\"4\\\"}\":6,\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"4\\\"}\":6},\"12\":{\"{\\\"v\\\":{\\\"type\\\":\\\"com.xyzboom.compiler.grammar.Terminator\\\",\\\"tokenName\\\":\\\"semicolon\\\"},\\\"t\\\":\\\"4\\\"}\":4}}}}\n"
//                )

        /**
         * Grammar from text
         *
         * @param str input text
         * @return Type 2 Grammar from input text
         */
        fun grammarFromText(str: String): Grammar2 {
            val tokens = parseCode(str, grammarLexerRules)
            return predictTable.generatorAST(tokens, grammarSkipTokens).getGrammar2()
        }

        internal fun ASTNode.getGrammar2(): Grammar2 {
            val prods = getGrammarProductions(ArrayList())
            assertASTNodeType(GRAMMAR_NAME)
            return Grammar2(prods[0].left, prods)
        }
    }
}